<template>
  <mt-swipe :auto="3000">
    <mt-swipe-item v-for="(item, i) in lunbotu" :key="i">
      <img :src="item[imgname]" :class="isfull?'img-full':'img-normal'"/>
    </mt-swipe-item>
  </mt-swipe>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {},
  props: ["lunbotu","imgname","isfull"], //使用轮播图组件必须传递一个轮播图数组，接收有img属性的图片
};
</script>

<style lang="scss" scoped>
.mint-swipe {
  height: 200px;
}
.mint-swipe-item {
  text-align: center;
  .img-full {//宽高撑满父元素
    height: 100%;
    width: 100%;
    overflow: hidden;
  }
  .img-normal{//图片高度100%，宽度自适应，横向居中显示
    height: 100%;
  }
}
</style>